This version of Rayshade can generate not only images, but also Range Maps
(also known as Z Buffers). A Range Map is a two dimensional
image, where each pixel is the floating point distance from the image
planeto the object in the scene. This is especially useful for generating
synthetic data sets for use in Computer Vision research, e.g. depth from
stereo and shape from shading. Those techniques all attempt to reconstruct
3D information from 2D images, and having the actual Range Map available
makes a quantitative analysis of the accuracy of reconstruction possible.
Range Maps are rendered for single frames from the same viewpoint used to
generate images, with the same window size and resolution. To enable Range
Map output, use the -z command line option:
The format of the file is specified by the filename suffix. Three formats are available:
integer X-coord integer Y-coord float DistanceSince each output line contains information on just one pixel, a blank line is inserted when the Y coordinate changes (i.e., when the data corresponds to a new scanline).
Why three formats? Heightfield Format is useful because it's very compact and can also be used as input to Rayshade; Text Format is easier to process in shell scripts; and Expanded Text Format is just right for quick displays using the GNUPlot display tool.